package com.HomeWorkhsp.Chapter08.poly_;

/**
 * Enjoy programming!!!
 * Time: 2021/11/25 -  18:54
 */
public class poly01 {
    public static void main(String[] args) {
        Master tom = new Master("汤姆");
        Dog dog = new Dog("大黄~");
        Bone bone = new Bone("大棒骨~");

        tom.feed(dog, bone);

        Cat cat = new Cat("小花猫~");
        Fish fish = new Fish("黄花鱼~");
        System.out.println("==========-----------");
        tom.feed(cat, fish);

        //添加给小猪喂米饭

        Pig pig = new Pig("小花猪");
        Rice rice = new Rice("米饭");
        System.out.println("=====================");
        tom.feed(pig,rice);
    }
}
